package com.kehongborui.spring.bean;

import com.kehongborui.spring.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;

/**
 * @author zhang peng yang ming
 * @CopyRight (C) http://www.csdn.com
 * @brief
 * @email 122162005@qq.com
 * @date 2018-07-26
 */
public class SpringMain {
    public static void main(String[] args) throws InterruptedException {
        // 初始化容器 IoC容容器
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        context.getBean("demo", Demo.class)
        System.out.println("容器被创建！");
//        context.close();

    }
}
